<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="${pageContext.request.contextPath}/boot/js/jquery-3.5.1.min.js"></script>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/boot/css/bootstrap.css">
  <script src="${pageContext.request.contextPath}/boot/js/bootstrap.js"></script>
  <script>
    window.onload=function () {
      $('#changeAS').click(function () {
        $.post({
          url:"${pageContext.request.contextPath}/question/changeAsQuestion",
          dataType:'text',
          data:undefined,
          success:function (data) {
            alert(data)
          },
          error:function () {
            alert("更新失败")
          }
        })
      })
      $('#changeMD').click(function () {
        $.post({
          url:"${pageContext.request.contextPath}/question/changeASMDQuestion",
          dataType:'text',
          data:undefined,
          success:function (data) {
            alert(data)
          },
          error:function () {
            alert("更新失败")
          }
        })
      })
      $('#changeMix').click(function () {
        $.post({
          url:"${pageContext.request.contextPath}/question/changeMixQuestion",
          dataType:'text',
          data:undefined,
          success:function (data) {
            alert(data)
          },
          error:function () {
            alert("更新失败")
          }
        })
      })
    }
  </script>
</head>
<body style="background-color: #66afe9">
  <h1 style="text-align: center">欢迎来到题库</h1>
  <div class="row" style="margin-top: 300px">
    <button onclick="window.location.href='${pageContext.request.contextPath}/question/toAdditionSubtraction'" type="button" class="btn btn-primary btn-lg btn-block">点击开始加减测试</button>
    <button onclick="window.location.href='${pageContext.request.contextPath}/question/toMultiplicationDivision'" type="button" class="btn btn-primary btn-lg btn-block">点击开始加减乘除测试</button>
    <button onclick="window.location.href='${pageContext.request.contextPath}/question/toMixTure'" type="button" class="btn btn-primary btn-lg btn-block">点击开始混合测试</button>
    <div class="row">
      <button type="button" id="changeAS" class="btn btn-lg btn-primary col-sm-4">更新加减题目</button>
      <button type="button" id="changeMD" class="btn btn-lg btn-primary col-sm-4">更新加减乘除题目</button>
      <button type="button" id="changeMix" class="btn btn-lg btn-primary col-sm-4">更新混合题目</button>
    </div>
  </div>
</body>
</html>
